import React,{PureComponent} from 'react'
import {View,Image,StyleSheet,TouchableOpacity,Text,Dimensions,Button,Platform} from 'react-native'

const {width} = Dimensions.get('window')

type Props = {
    info:Object,
}

export default class DetailCommentCell extends PureComponent<Props>{

    render(){
        return (
            <View>
                <View style={styles.container}>
                    <Image style={styles.image} source={require('../../../res/img/ic_avatar_default.png')}/>
                    <View style={styles.teacher_view}>
                        <Text style={styles.name}>{this.props.info.name}</Text>
                        <Text style={styles.time}>{this.props.info.time}</Text>
                        <Text style={styles.comment}>{this.props.info.comment}</Text>
                        <Text style={styles.source}>{this.props.info.source}</Text>
                    </View>
                </View>
                <View style={{backgroundColor:'rgba(0,0,0,0.1)',height:1,width:(width-24),marginLeft:12}}/>
            </View>
        )
    }
}
const styles =StyleSheet.create({
    container:{
        flexDirection:'row',
        paddingRight:12,
        paddingLeft:28,
        paddingBottom:10,
        paddingTop:12,
        backgroundColor:'white',
    },
      image:{
        width:40,
          height:40,
      } ,
    teacher_view:{
      marginLeft:43,
      backgroundColor:'white',
        flex:1,
    },
    name:{
        color:'black',
        fontSize:13,
        fontWeight:'bold',
    },
    time:{
       color:'rgba(0,0,0,0.5)',
        fontSize:11,
        marginTop:10,
        marginBottom:10,
        fontWeight:'200',
    },
    comment:{
        color:'black',
        fontSize:11,
        fontWeight:'200',
        lineHeight:20,
    },
    detail:{
        marginTop:15,
        fontSize:11,
        color:'black',
        fontWeight:'200',
        lineHeight:20,
    },
    source:{
        color:'rgba(0,0,0,0.3)',
        fontSize:9,
        fontWeight:'200',
        marginTop:10,
    },
})